<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>2.2 Hello Itcast | 引言</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../c02/s03.html" />
    
    
    <link rel="prev" href="../c02/s01.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.2"
        data-chapter-title="2.2 Hello Itcast"
        data-filepath="c02/s02.md"
        data-basepath=".."
        data-revision="Fri Feb 10 2017 17:36:30 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        引言
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="c01/index.html">
            
                
                    <a href="../c01/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        1 关于Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="c01/s01.html">
            
                
                    <a href="../c01/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        1.1 Tornado是为何物
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="c01/s02.html">
            
                
                    <a href="../c01/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        1.2 Tornado与Django
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="c02/index.html">
            
                
                    <a href="../c02/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        2 初识Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="c02/s01.html">
            
                
                    <a href="../c02/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        2.1 安装
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2" data-path="c02/s02.html">
            
                
                    <a href="../c02/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        2.2 Hello Itcast
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="c02/s03.html">
            
                
                    <a href="../c02/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        2.3 httpserver
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="c02/s04.html">
            
                
                    <a href="../c02/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        2.4 options
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="c02/s05.html">
            
                
                    <a href="../c02/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        2.5 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="c03/index.html">
            
                
                    <a href="../c03/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        3 深入Tornado
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="c03/s01.html">
            
                
                    <a href="../c03/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        3.1 Application
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="c03/s02.html">
            
                
                    <a href="../c03/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        3.2 输入
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="c03/s03.html">
            
                
                    <a href="../c03/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        3.3 输出
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="c03/s04.html">
            
                
                    <a href="../c03/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        3.4 接口与调用顺序
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="c03/s05.html">
            
                
                    <a href="../c03/s05.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        3.5 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="c04/index.html">
            
                
                    <a href="../c04/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        4 模板
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="c04/s01.html">
            
                
                    <a href="../c04/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        4.1 静态文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="c04/s02.html">
            
                
                    <a href="../c04/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        4.2 使用模板
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="c04/s03.html">
            
                
                    <a href="../c04/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        4.3 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="c05/index.html">
            
                
                    <a href="../c05/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        5 数据库
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="c05/s01.html">
            
                
                    <a href="../c05/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        5.1 数据库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="c05/s02.html">
            
                
                    <a href="../c05/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        5.2 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="c06/index.html">
            
                
                    <a href="../c06/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        6 安全应用
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="c06/s01.html">
            
                
                    <a href="../c06/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        6.1 Cookie
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="c06/s02.html">
            
                
                    <a href="../c06/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        6.2 XSRF
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="c06/s03.html">
            
                
                    <a href="../c06/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        6.3 用户验证
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="c06/s04.html">
            
                
                    <a href="../c06/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        6.4 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="c07/index.html">
            
                
                    <a href="../c07/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        7 异步与WebSocket
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="c07/s01.html">
            
                
                    <a href="../c07/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        7.1 认识异步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="c07/s02.html">
            
                
                    <a href="../c07/s02.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        7.2 Tornado异步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="c07/s03.html">
            
                
                    <a href="../c07/s03.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        7.3 WebSocket
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.4" data-path="c07/s04.html">
            
                
                    <a href="../c07/s04.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.4.</b>
                        
                        7.4 练习
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="c08/index.html">
            
                
                    <a href="../c08/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        8 部署
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="c08/s01.html">
            
                
                    <a href="../c08/s01.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        8.1 部署Tornado
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >引言</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="22-hello-itcast">2.2 Hello Itcast</h1>
<h2 id="&#x4E0A;&#x4EE3;&#x7801;">&#x4E0A;&#x4EE3;&#x7801;</h2>
<p>&#x65B0;&#x5EFA;&#x6587;&#x4EF6;hello.py&#xFF0C;&#x4EE3;&#x7801;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-python"><span class="hljs-comment"># coding:utf-8</span>

<span class="hljs-keyword">import</span> tornado.web
<span class="hljs-keyword">import</span> tornado.ioloop

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">IndexHandler</span><span class="hljs-params">(tornado.web.RequestHandler)</span>:</span>
    <span class="hljs-string">&quot;&quot;&quot;&#x4E3B;&#x8DEF;&#x7531;&#x5904;&#x7406;&#x7C7B;&quot;&quot;&quot;</span>
    <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">get</span><span class="hljs-params">(self)</span>:</span>
        <span class="hljs-string">&quot;&quot;&quot;&#x5BF9;&#x5E94;http&#x7684;get&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&quot;&quot;&quot;</span>
        self.write(<span class="hljs-string">&quot;Hello Itcast!&quot;</span>)

<span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">&quot;__main__&quot;</span>:
    app = tornado.web.Application([
        (<span class="hljs-string">r&quot;/&quot;</span>, IndexHandler),
    ])
    app.listen(<span class="hljs-number">8000</span>)
    tornado.ioloop.IOLoop.current().start()
</code></pre>
<p>&#x6267;&#x884C;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#xFF0C;&#x5F00;&#x542F;tornado&#xFF1A;</p>
<pre><code class="lang-bash">$ python hello.py
</code></pre>
<p>&#x6253;&#x5F00;&#x6D4F;&#x89C8;&#x5668;&#xFF0C;&#x8F93;&#x5165;&#x7F51;&#x5740;127.0.0.1:8000&#xFF08;&#x6216;localhost:8000&#xFF09;&#xFF0C;&#x67E5;&#x770B;&#x6548;&#x679C;&#xFF1A;
<img src="../images/demo_hello_world.png" alt="hello world"></p>
<h2 id="&#x4EE3;&#x7801;&#x8BB2;&#x89E3;">&#x4EE3;&#x7801;&#x8BB2;&#x89E3;</h2>
<h4 id="1-tornadoweb">1. tornado.web</h4>
<p>tornado&#x7684;&#x57FA;&#x7840;web&#x6846;&#x67B6;&#x6A21;&#x5757;</p>
<ul>
<li><p><strong>RequestHandler</strong> </p>
<p>  &#x5C01;&#x88C5;&#x4E86;&#x5BF9;&#x5E94;&#x4E00;&#x4E2A;&#x8BF7;&#x6C42;&#x7684;&#x6240;&#x6709;&#x4FE1;&#x606F;&#x548C;&#x65B9;&#x6CD5;&#xFF0C;write(&#x54CD;&#x5E94;&#x4FE1;&#x606F;)&#x5C31;&#x662F;&#x5199;&#x54CD;&#x5E94;&#x4FE1;&#x606F;&#x7684;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#xFF1B;&#x5BF9;&#x5E94;&#x6BCF;&#x4E00;&#x79CD;http&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF08;get&#x3001;post&#x7B49;&#xFF09;&#xFF0C;&#x628A;&#x5BF9;&#x5E94;&#x7684;&#x5904;&#x7406;&#x903B;&#x8F91;&#x5199;&#x8FDB;&#x540C;&#x540D;&#x7684;&#x6210;&#x5458;&#x65B9;&#x6CD5;&#x4E2D;&#xFF08;&#x5982;&#x5BF9;&#x5E94;get&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF0C;&#x5C31;&#x5C06;&#x5BF9;&#x5E94;&#x7684;&#x5904;&#x7406;&#x903B;&#x8F91;&#x5199;&#x5728;get()&#x65B9;&#x6CD5;&#x4E2D;&#xFF09;&#xFF0C;&#x5F53;&#x6CA1;&#x6709;&#x5BF9;&#x5E94;&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#x7684;&#x6210;&#x5458;&#x65B9;&#x6CD5;&#x65F6;&#xFF0C;&#x4F1A;&#x8FD4;&#x56DE;&#x201C;<strong>405: Method Not Allowed</strong>&#x201D;&#x9519;&#x8BEF;&#x3002;</p>
<p>  &#x6211;&#x4EEC;&#x5C06;&#x4EE3;&#x7801;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;get()&#x65B9;&#x6CD5;&#x66F4;&#x6539;&#x4E3A;post()&#x540E;&#xFF0C;&#x518D;&#x7528;&#x6D4F;&#x89C8;&#x5668;&#x91CD;&#x65B0;&#x8BBF;&#x95EE;&#xFF08;&#x6D4F;&#x89C8;&#x5668;&#x5730;&#x5740;&#x680F;&#x4E2D;&#x8F93;&#x5165;&#x7F51;&#x5740;&#x8BBF;&#x95EE;&#x7684;&#x65B9;&#x5F0F;&#x4E3A;get&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&#xFF09;&#xFF0C;&#x6F14;&#x793A;&#x5982;&#x4E0B;&#xFF1A;</p>
<pre><code class="lang-python">  <span class="hljs-comment"># coding:utf-8</span>

  <span class="hljs-keyword">import</span> tornado.web
  <span class="hljs-keyword">import</span> tornado.ioloop

  <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">IndexHandler</span><span class="hljs-params">(tornado.web.RequestHandler)</span>:</span>
      <span class="hljs-string">&quot;&quot;&quot;&#x4E3B;&#x8DEF;&#x7531;&#x5904;&#x7406;&#x7C7B;&quot;&quot;&quot;</span>
      <span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">post</span><span class="hljs-params">(self)</span>:</span>  <span class="hljs-comment"># &#x6211;&#x4EEC;&#x4FEE;&#x6539;&#x4E86;&#x8FD9;&#x91CC;</span>
          <span class="hljs-string">&quot;&quot;&quot;&#x5BF9;&#x5E94;http&#x7684;post&#x8BF7;&#x6C42;&#x65B9;&#x5F0F;&quot;&quot;&quot;</span>
          self.write(<span class="hljs-string">&quot;Hello Itcast!&quot;</span>)

  <span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">&quot;__main__&quot;</span>:
      app = tornado.web.Application([
          (<span class="hljs-string">r&quot;/&quot;</span>, IndexHandler),
      ])
      app.listen(<span class="hljs-number">8000</span>)
      tornado.ioloop.IOLoop.current().start()
</code></pre>
<p>  <img src="../images/405_method_not_allowed.png" alt="&#x8FD4;&#x56DE;405&#x9519;&#x8BEF;"></p>
</li>
<li><p><strong>Application</strong> </p>
<p>  Tornado Web&#x6846;&#x67B6;&#x7684;&#x6838;&#x5FC3;&#x5E94;&#x7528;&#x7C7B;&#xFF0C;&#x662F;&#x4E0E;&#x670D;&#x52A1;&#x5668;&#x5BF9;&#x63A5;&#x7684;&#x63A5;&#x53E3;&#xFF0C;&#x91CC;&#x9762;&#x4FDD;&#x5B58;&#x4E86;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x8868;&#xFF0C;&#x5176;&#x521D;&#x59CB;&#x5316;&#x63A5;&#x6536;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x53C2;&#x6570;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x8DEF;&#x7531;&#x4FE1;&#x606F;&#x6620;&#x5C04;&#x5143;&#x7EC4;&#x7684;&#x5217;&#x8868;&#xFF1B;&#x5176;listen(&#x7AEF;&#x53E3;)&#x65B9;&#x6CD5;&#x7528;&#x6765;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;http&#x670D;&#x52A1;&#x5668;&#x5B9E;&#x4F8B;&#xFF0C;&#x5E76;&#x7ED1;&#x5B9A;&#x5230;&#x7ED9;&#x5B9A;&#x7AEF;&#x53E3;&#xFF08;<strong>&#x6CE8;&#x610F;&#xFF1A;&#x6B64;&#x65F6;&#x670D;&#x52A1;&#x5668;&#x5E76;&#x672A;&#x5F00;&#x542F;&#x76D1;&#x542C;</strong>&#xFF09;&#x3002;</p>
</li>
</ul>
<h4 id="2-tornadoioloop">2. tornado.ioloop</h4>
<p>tornado&#x7684;&#x6838;&#x5FC3;io&#x5FAA;&#x73AF;&#x6A21;&#x5757;&#xFF0C;&#x5C01;&#x88C5;&#x4E86;Linux&#x7684;epoll&#x548C;BSD&#x7684;kqueue&#xFF0C;tornado&#x9AD8;&#x6027;&#x80FD;&#x7684;&#x57FA;&#x77F3;&#x3002;
&#x4EE5;Linux&#x7684;epoll&#x4E3A;&#x4F8B;&#xFF0C;&#x5176;&#x539F;&#x7406;&#x5982;&#x4E0B;&#x56FE;&#xFF1A;</p>
<p><img src="../images/ioloop_epoll.png" alt="ioloop&#x539F;&#x7406;"></p>
<ul>
<li><p><strong>IOLoop.current()</strong> </p>
<p>  &#x8FD4;&#x56DE;&#x5F53;&#x524D;&#x7EBF;&#x7A0B;&#x7684;IOLoop&#x5B9E;&#x4F8B;&#x3002;</p>
</li>
<li><p><strong>IOLoop.start()</strong> </p>
<p>  &#x542F;&#x52A8;IOLoop&#x5B9E;&#x4F8B;&#x7684;I/O&#x5FAA;&#x73AF;,&#x540C;&#x65F6;&#x670D;&#x52A1;&#x5668;&#x76D1;&#x542C;&#x88AB;&#x6253;&#x5F00;&#x3002;</p>
</li>
</ul>
<h2 id="&#x603B;&#x7ED3;tornado-web&#x7A0B;&#x5E8F;&#x7F16;&#x5199;&#x601D;&#x8DEF;">&#x603B;&#x7ED3;Tornado Web&#x7A0B;&#x5E8F;&#x7F16;&#x5199;&#x601D;&#x8DEF;</h2>
<ol>
<li>&#x521B;&#x5EFA;web&#x5E94;&#x7528;&#x5B9E;&#x4F8B;&#x5BF9;&#x8C61;&#xFF0C;&#x7B2C;&#x4E00;&#x4E2A;&#x521D;&#x59CB;&#x5316;&#x53C2;&#x6570;&#x4E3A;&#x8DEF;&#x7531;&#x6620;&#x5C04;&#x5217;&#x8868;&#x3002;</li>
<li>&#x5B9A;&#x4E49;&#x5B9E;&#x73B0;&#x8DEF;&#x7531;&#x6620;&#x5C04;&#x5217;&#x8868;&#x4E2D;&#x7684;handler&#x7C7B;&#x3002;</li>
<li>&#x521B;&#x5EFA;&#x670D;&#x52A1;&#x5668;&#x5B9E;&#x4F8B;&#xFF0C;&#x7ED1;&#x5B9A;&#x670D;&#x52A1;&#x5668;&#x7AEF;&#x53E3;&#x3002;</li>
<li>&#x542F;&#x52A8;&#x5F53;&#x524D;&#x7EBF;&#x7A0B;&#x7684;IOLoop&#x3002;</li>
</ol>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../c02/s01.html" class="navigation navigation-prev " aria-label="Previous page: 2.1 安装"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../c02/s03.html" class="navigation navigation-next " aria-label="Next page: 2.3 httpserver"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
